package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.ruoyi.system.domain.PAnswer;
import com.ruoyi.system.domain.vo.PAnswerVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 问题答案Mapper接口
 *
 * @author ruoyi
 * @date 2022-07-19
 */
public interface PAnswerMapper extends BaseMapperPlus<PAnswerMapper, PAnswer, PAnswerVo> {

    /**
     * 问题答案
     */
    Page<PAnswer> selectMyPageList(@Param("build") Page<PAnswer> build, @Param(Constants.WRAPPER) Wrapper<PAnswer> queryWrapper);

    /**
     * 查看详情
     */
    PAnswer selectMyInfo(Long id);

    /**
     * 根据问题查询回答
     */
    List<PAnswer> selectListByQid(Long id);

    List<PAnswer> selectListByQuestionId(@Param("pageQuery") PageQuery pageQuery, @Param("questionId") Long questionId);
}
